#pragma once 

#include "Math/Maths.h"
#include "Engine/Engine Classes/SceneTree/SceneTree.h"
#include "Engine/PreApi Classes/Shader/IShader.h"

class CCamera: public CSceneNode
{
protected:
    maths::CMatrix4x4f m_mView;
    maths::CMatrix4x4f m_mProj;
    maths::CMatrix4x4f m_mViewProj;
    maths::CPointArray m_FrustumPoints;
    mBool m_bEnabled;
    
public:
    CCamera                              ( mString a_sFileName );
    /* Calculating matrices & frustum pts */
    mVoid Update                         ( );
    maths::CPointArray *GetFrustumPoints ( );
    /* Updating matrix using current pos, up, dir */
    mVoid GenViewMtx                     ( );
    mVoid GenProjMtx                     ( const mFloat a_fFovyDeg, const mFloat a_fAspect,
        const mFloat a_fNearDis, const mFloat a_fFarDis );
    mVoid SetEnabled                     ( mBool a_bEnable );
    mBool Enabled                        ( );
    mVoid SendViewProj                   ( CIShader *a_pIShader );
    mVoid SendView                       ( CIShader *a_pIShader );
    mVoid SendProj                       ( CIShader *a_pIShader );
    maths::CVector4f& Pos                ( );
    maths::CVector4f& Dir                ( );
    ~CCamera                             ( );
};